set nocompatible "disable vi compatiblity


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vundle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'gmarik/Vundle.vim' "let Vundle manage Vundle
Plugin 'scrooloose/nerdtree' "Nerdtree=
Plugin 'jlanzarotta/bufexplorer' "bufexplorer
Plugin 'Lokaltog/powerline' "powerline install
Plugin 'phleet/vim-mercenary' "vim mercurial wrapper


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text formatting, indent and tabs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    set autoindent " preserve indentation
    set backspace=indent,eol,start " smart backspace
    set cinkeys-=0# " don't force # indentation
    set expandtab " no real tabs
    set ignorecase " by default ignore case
    set nrformats+=alpha " incr/decr letters C-a/-x
    set shiftround " be clever with tabs
    set shiftwidth=4 " default 8
    set smartcase " sensitive with uppercase
    set smarttab " tab to 0,4,8 etc.
    set softtabstop=4 " "tab" feels like <tab>
    set tabstop=4 " replace <TAB> w/4 spaces

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Powerline status bar setup and settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has ('win32')
    set guifont=Powerline_Consolas:h9:cANSI
    else
        set guifont=Powerline\ Consolas\ 10
        endif
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme             = 'powerlineish'
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
let g:Powerline_symbols = "fancy"
set rtp+=~/.vim/bundle/powerline/powerline/bindings/vim
set laststatus=2

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on "enable syntax highlighting
set t_Co=256 "set color to 256
set clipboard=unnamedplus "sane copy past

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"key binds
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader=","
nnoremap <leader>w :w!<cr> 
nnoremap <leader>q :q<ENTER>
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
